<form action="${ctx}/channel/assign" method="post" id="assignChannel" enctype="multipart/form-data">
	<input type="hidden" name="channelId" value="${channel.channelId!}" />

	<div class="form-group form-inline row">
		<div class="col-sm-12">
			<label><span style="color: red">*</span>分配给:</label>
			<select class="form-control select2" name="companyId"  required>
				<option value="">--请选择--</option>
				<#list companyInfoList as c>
					<option value="${c.companyId}">${c.companyName!}</option>
				</#list>
			</select>
			<input type="hidden" name="companyName" />
		</div>
	</div>
</form>

<script>
	$("#assignChannel").validate();
	
	$('.select2').select2();
	$.fn.modal.Constructor.prototype.enforceFocus = function() {};
	
	// 切换企业选择  
	$("select[name='companyId']").change(function(){
		var companyName = $(this).find("option:selected").text();
		$("input[name='companyName']").val(companyName);
	});
</script>
